package com.freshcity.component.tooltip
{
	import com.freshcity.lib.tooltip.IToolTip;

	import flash.display.Sprite;

	public class Tooltip extends Sprite implements IToolTip
	{
		public var tooTip1:NormalTooltip;
		public var tooTip2:NormalTooltip;

		public function Tooltip()
		{
			this.init();
			super();
			return;
		}

		private function init():void
		{
			this.tooTip1=new NormalTooltip();
			this.tooTip2=new NormalTooltip();
			return;
		}

		public function set data(arg1:*):void
		{
			var loc1:*=undefined;
			var loc2:*=undefined;
			var loc3:*=null;
			var loc4:*=null;
			var loc5:*=null;
			var loc6:*=null;
			var loc7:*=null;
			this.clear();
			loc1=arg1;


			if (loc1)
			{
				this.tooTip1.data=loc1;
				this.addChild(this.tooTip1);
			}
			if (loc2)
			{
				this.tooTip2.data=loc2;
				this.addChild(this.tooTip2);
				this.tooTip1.x=this.tooTip2.x + this.tooTip2.width + 5;
				this.tooTip1.y=this.tooTip2.y;
			}
			else
			{
				this.tooTip1.x=0;
				this.tooTip1.y=0;
			}
			return;
		}

		private function clear():void
		{
			if (this.tooTip1.parent)
			{
				this.tooTip1.parent.removeChild(this.tooTip1);
			}
			if (this.tooTip2.parent)
			{
				this.tooTip2.parent.removeChild(this.tooTip2);
			}
			return;
		}

		private function updatePos():void
		{
			return;
		}

		public function dispose():void
		{
			this.tooTip1.dispose();
			this.tooTip2.dispose();
			return;
		}
	}
}
